﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using easysql;
namespace Dal
{
    public class ResourceDal:BaseDal<ResourceModel>
    {
        public ResourceDal() : base("tb_resource")
        {


        }


        public void Add_AutoSetId(ResourceModel model)
        {

            dh.Add_AutoSetId(this.tbname, model);
        }

        public ResourceModel queryById(int id)
        {
            return dh.QueryById<ResourceModel>(tbname, id);
        }

       
        public ResourceModel queryByGuid(string guid)
        {
            var list = dh.Query<ResourceModel>(tbname, new ResourceModel() { guid = guid });
            return list.FirstOrDefault();
        }
    }
}
